<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="post">Post请求</button>
    <button id="put">Put请求</button>
    <button id="delete">Delete请求</button>
</body>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script>
    let buttonPost = document.querySelector('#post');
    let buttonPut = document.querySelector('#put');
    let buttonDelete = document.querySelector('#delete');

    buttonPost.onclick = function(){
        $.ajax({
            type: 'post',
            url: 'test1',
            contentType: 'charset=utf8',
            success: function(body){
                let div = document.createElement('div');
                div.innerHTML = body;
                buttonPost.appendChild(div);

            }
        })
    }

    buttonPut.onclick = function(){
        $.ajax({
            type: 'put',
            url: 'test1',
            contentType: 'charset=utf8',
            success: function(body){
                let div = document.createElement('div');
                div.innerHTML = body;
                buttonPut.appendChild(div);
            }
        })
    }

    buttonDelete.onclick = function(){
        $.ajax({
            type: 'delete',
            url: 'test1',
            contentType: 'charset=utf8',
            success: function(body){
                let div = document.createElement('div');
                div.innerHTML = body;
                buttonDelete.appendChild(div);
            }
        })
    }
</script>
</html>